package com.mew.common.exception;

/**
 * 业务层异常
 * @Auther: SK ON  2018/10/31 14:48
 * @Description:
 */
public class MewException extends RuntimeException {
    private static final long serialVersionUID = 8182815460722287938L;
    private String message;
    private ResponseCode state;

    public MewException(ResponseCode responseCode){
        this.state = responseCode;
        this.message = responseCode.msg();
    }


    public MewException(String message) {
        super(message);
        this.message = message;
        this.state = ResponseCode.SysException;
    }


    public MewException(final String msgCode, final Throwable ex) {
        super(msgCode, ex);
    }

    public String getMessge() {
        return message;
    }

    public ResponseCode getState(){
        return state;
    }

}
